Skip to content

ci: Cancel in-progress workflow runs on branch push - #232

Merged
dividedmind merged 1 commit into
mainfrom
ci/cancel-branch-runs
Sep 4, 2026
Merged

ci: Cancel in-progress workflow runs on branch push#232
dividedmind merged 1 commit into
mainfrom
ci/cancel-branch-runs

Conversation

@dividedmind

Copy link
Copy Markdown
Collaborator

Add a concurrency block to the top-level configuration of the lint and test workflow. This groups runs by workflow and branch reference (${{ github.workflow }}-${{ github.ref }}) and enables automatic cancellation of active runs on any push (cancel-in-progress: true), while keeping the main branch protected from cancellation.

Assisted-by: Gemini CLI:gemini-3.5-flash

Add a `concurrency` block to the top-level configuration of the lint
and test workflow. This groups runs by workflow and branch reference
(`${{ github.workflow }}-${{ github.ref }}`) and enables automatic
cancellation of active runs on any push (`cancel-in-progress: true`),
while keeping the `main` branch protected from cancellation.

Assisted-by: Gemini CLI:gemini-3.5-flash
@dividedmind
dividedmind requested review from kgilpin and a lite review from Copilot September 4, 2026 04:30
@dividedmind dividedmind self-assigned this Sep 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The concurrency configuration is correctly scoped at the workflow level and matches the stated intent to cancel branch runs while keeping main protected.

Pull request overview

This PR adds a workflow-level GitHub Actions concurrency configuration to reduce redundant CI work by canceling prior in-progress runs when new commits are pushed to the same branch, while ensuring main runs are not cancelled.

Changes:

  • Added a top-level concurrency block to group runs by workflow + ref (${{ github.workflow }}-${{ github.ref }}).
  • Enabled cancel-in-progress for all refs except refs/heads/main.
File summaries
File Description
.github/workflows/ci.yml Adds workflow-level concurrency grouping and conditional cancellation to avoid overlapping CI runs on branch pushes.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dividedmind
dividedmind merged commit c34dc96 into main Sep 4, 2026
15 of 16 checks passed
@dividedmind
dividedmind deleted the ci/cancel-branch-runs branch September 4, 2026 18:02
@appmap-releasebot

Copy link
Copy Markdown

🎉 This PR is included in version 2.26.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants